#include <iostream>
#include <stack>
using namespace std;

template<class T>
void invert_input(stack<T>& s) {
    char c = 0;
    while (-1 != (c = cin.get())) {
        s.push(c);
    }
    while (s.size()) {
        cout << s.top();
        s.pop();
    }
}

int main() {
    stack<char> s;
    invert_input<char>(s);
    return 0;
}

